package com.um.jdy.platform.market.entity.dto;

import com.um.springboot.starter.orm.params.PageDTO;
import com.um.springboot.starter.orm.params.PageParams;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
public class ActivityGoodsPageDTO extends PageDTO {

    @ApiModelProperty("商品名称")
    protected String shopGoodsName;

    @ApiModelProperty("是否上架")
    protected String isUpper;

    @Override
    public PageParams toPageParams() {
        PageParams pageParams = toPageParams(
                new String[]{"shopGoodsName","isUpper"},
                new String[]{"shop_goods_name","is_upper"});
        pageParams.getCondition().put("orderby", "create_time DESC");
        return pageParams;
    }
}
